'use strict';
/**
 * Created by FreezeSoul on 2015/9/30.
 */
define([
        'angular',
        'app/modules/page/define',
        'app/modules/page/services/page'
    ],
    function(angular) {
        angular.module('ad.page')
            .controller('adPageSettingController',['$scope','$uibModalInstance','adPageEditService','item','layout',function($scope,$uibModalInstance,service,item,layout) {
                $scope.item = item;
                $scope.layout = layout;

                //$scope.has_Headers = $scope.layout.getOption().settings.hasHeaders;

                $scope.ok = function () {

                    /*var option = $scope.layout.getOption();
                    option.settings.hasHeaders = $scope.has_Headers;
                    if ($scope.has_Headers) {
                        option.dimensions.headerHeight = 20;
                    }*/

                    //$scope.item.page_data = angular.toJson(option);

                    $uibModalInstance.close($scope.item);
                };

                $scope.cancel = function () {
                    $uibModalInstance.dismiss('cancel');
                };
            }]);
    });